#!/usr/bin/env node

/**
 * hysj-cli
 * 快速初始化项目模板
 *
 * @author hysj <www>
 */

const init = require('./utils/init');
const cli = require('./utils/cli');
const log = require('./utils/log');

const tplCopy = require('./utils/tplCopy')

const input = cli.input;
const flags = cli.flags;
const { clear, debug, type, name } = flags;

(async () => {
	init({ clear });
	input.includes(`help`) && cli.showHelp(0);

	debug && log(flags);

	type && name && tplCopy(type.toLowerCase(), name)

})();
